package com.ban.springcloud.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Ban
 * @date 2022/1/12 17:47
 * 通用结果集 的返回
 */

@AllArgsConstructor
@NoArgsConstructor
@Data
public class CommonResult<T> {
    private Integer code;
    private String message;
    //此处定义 T 代表传输 payment 返回 payment，传入 order 返回 order
    private T data;
    public CommonResult(Integer code,String message){
        this(code,message,null);
    }
}
